package com.sakura.test;

import com.sakura.tx.TxConfig;
import com.sakura.tx.userService;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Sakura
 * @Date 2023-03-08 16:29
 */
public class IOCTest_Tx {

    @Test
    public void testTx(){
        AnnotationConfigApplicationContext configApplicationContext
                =new AnnotationConfigApplicationContext(TxConfig.class);

        userService userService = configApplicationContext.getBean(userService.class);
        userService.insert();

        configApplicationContext.close();

    }
}
